package com.gree.flowable.app.pojo.vo;

import com.gree.flowable.app.tools.constants.CommentTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

@ApiModel(description = "审批日志VO")
public class CommentVO implements Serializable {

    protected String id;

    @ApiModelProperty("任务ID")
    protected String taskId;

    @ApiModelProperty("添加人")
    protected String userId;

    @ApiModelProperty("用户名称")
    protected String userName;

    @ApiModelProperty("用户头像链接")
    protected String userUrl;

    @ApiModelProperty("流程实例ID")
    protected String processInstanceId;

    @ApiModelProperty("意见信息")
    protected String message;

    @ApiModelProperty("审批时间")
    protected Date time;

    @ApiModelProperty("审批类型")
    private String type;

    @ApiModelProperty("审批类型名称")
    private String typeName;

    @ApiModelProperty("任务名称")
    private String taskName;

    @ApiModelProperty("评论全信息")
    private String fullMsg;

    public CommentVO() {
    }

    public CommentVO(String userId, String processInstanceId, String type, String message) {
        this.userId = userId;
        this.processInstanceId = processInstanceId;
        this.message = message;
        this.type = type;
    }

    public CommentVO(String taskId, String userId, String processInstanceId, String type, String message) {
        this.taskId = taskId;
        this.userId = userId;
        this.processInstanceId = processInstanceId;
        this.message = message;
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserUrl() {
        return userUrl;
    }

    public void setUserUrl(String userUrl) {
        this.userUrl = userUrl;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
        this.typeName = CommentTypeEnum.getEnumMsgByType(type);
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getFullMsg() {
        return fullMsg;
    }

    public void setFullMsg(String fullMsg) {
        this.fullMsg = fullMsg;
    }
}
